//
//  BaseParser.m
//  MyFamework
//
//  Created by carlos on 13-4-3.
//  Copyright (c) 2013年 carlos. All rights reserved.
//

#import "BaseParser.h"
#import "BaseDomain.h"
@implementation BaseParser
//是否已经成功
+(void)success:(NSString *)content withThreadMsg:(ThreadMessage *)threadMsg{
    NSError *error = nil;
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[content dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error];
    if (json == nil) {
        CLog(@"json parse failed \r\n");
        return ;
    }

//    NSDictionary *arr = [baseDict objectForKey:@"result"];
    NSString *success = [json objectForKey:@"success"];
    threadMsg.receiveIsSuccess = [@"1"  isEqualToString:success];
    threadMsg.receiveMsg = [json objectForKey:@"msg"];
    threadMsg.receiveJsonContent = content;
}

@end
